//Page 330
#include <algorithm>
#include <cstddef>
#include <string>
#include <iostream>

using namespace std;

bool contains_e ( const string & s )
{
	return s.find('e') != string::npos;
}

int main()
{
	string a[] = {"read", "my", "lips"};
	const size_t SIZE = sizeof a / sizeof a[0];
	string b[SIZE];

	string * endb = replace_copy_if (a, a+SIZE, b, contains_e, string("kiss"));

	string * beginb = b;

	while( beginb != endb )
		cout<< *beginb++ << endl;

	return 0 ;
}
